MCUXpresso SDK API Reference Manual  Rev 2.15.000
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
DCIC

Overview

Data Structures

struct  _dcic_config
 DCIC configuration. More...
 
struct  _dcic_region_config
 Region of interest (ROI) configuration. More...
 

Macros

#define FSL_DCIC_DRIVER_VERSION   (MAKE_VERSION(2, 0, 3))
 DCIC driver version. More...
 
#define DCIC_CRC32_POLYNOMIAL   0x04C11DB7UL
 CRC32 calculation polynomial. More...
 
#define DCIC_CRC32_INIT_VALUE   0UL
 CRC32 calculation initialize value. More...
 
#define DCIC_REGION_MISMATCH_STATUS(region)   (1UL << (DCIC_DCICS_ROI_MATCH_STAT_SHIFT + (region)))
 ROI CRC32 value mismatch status. More...
 

Typedefs

typedef struct _dcic_config dcic_config_t
 DCIC configuration.
 
typedef struct _dcic_region_config dcic_region_config_t
 Region of interest (ROI) configuration.
 

Enumerations

enum  _DCIC_polarity_flags {
  kDCIC_VsyncActiveHigh = 0U,
  kDCIC_HsyncActiveHigh = 0U,
  kDCIC_DataEnableActiveHigh = 0U,
  kDCIC_DriveDataOnFallingClkEdge = 0U,
  kDCIC_VsyncActiveLow = DCIC_DCICC_VSYNC_POL_MASK,
  kDCIC_HsyncActiveLow = DCIC_DCICC_HSYNC_POL_MASK,
  kDCIC_DataEnableActiveLow = DCIC_DCICC_DE_POL_MASK,
  kDCIC_DriveDataOnRisingClkEdge = DCIC_DCICC_CLK_POL_MASK
}
 DCIC display signal polarity flags. More...
 
enum  _DCIC_status_flags {
  kDCIC_FunctionalInterruptStatus = DCIC_DCICS_FI_STAT_MASK,
  kDCIC_ErrorInterruptStatus = DCIC_DCICS_EI_STAT_MASK,
  kDCIC_Region0MismatchStatus = DCIC_REGION_MISMATCH_STATUS(0U),
  kDCIC_Region1MismatchStatus = DCIC_REGION_MISMATCH_STATUS(1U),
  kDCIC_Region2MismatchStatus = DCIC_REGION_MISMATCH_STATUS(2U),
  kDCIC_Region3MismatchStatus = DCIC_REGION_MISMATCH_STATUS(3U),
  kDCIC_Region4MismatchStatus = DCIC_REGION_MISMATCH_STATUS(4U),
  kDCIC_Region5MismatchStatus = DCIC_REGION_MISMATCH_STATUS(5U),
  kDCIC_Region6MismatchStatus = DCIC_REGION_MISMATCH_STATUS(6U),
  kDCIC_Region7MismatchStatus = DCIC_REGION_MISMATCH_STATUS(7U),
  kDCIC_Region8MismatchStatus = DCIC_REGION_MISMATCH_STATUS(8U),
  kDCIC_Region9MismatchStatus = DCIC_REGION_MISMATCH_STATUS(9U),
  kDCIC_Region10MismatchStatus = DCIC_REGION_MISMATCH_STATUS(10U),
  kDCIC_Region11MismatchStatus = DCIC_REGION_MISMATCH_STATUS(11U),
  kDCIC_Region12MismatchStatus = DCIC_REGION_MISMATCH_STATUS(12U),
  kDCIC_Region13MismatchStatus = DCIC_REGION_MISMATCH_STATUS(13U),
  kDCIC_Region14MismatchStatus = DCIC_REGION_MISMATCH_STATUS(14U),
  kDCIC_Region15MismatchStatus = DCIC_REGION_MISMATCH_STATUS(15U)
}
 Status flags. More...
 
enum  _dcic_interrupt_enable {
  kDCIC_FunctionalInterruptEnable = DCIC_DCICIC_FI_MASK_MASK,
  kDCIC_ErrorInterruptEnable = DCIC_DCICIC_EI_MASK_MASK
}
 Interrupts. More...
 

Initialization and deinitialization

void DCIC_Init (DCIC_Type *base, const dcic_config_t *config)
 Initializes the DCIC. More...
 
void DCIC_Deinit (DCIC_Type *base)
 Deinitialize the DCIC. More...
 
void DCIC_GetDefaultConfig (dcic_config_t *config)
 Get the default configuration to initialize DCIC. More...
 
static void DCIC_Enable (DCIC_Type *base, bool enable)
 Enable or disable the DCIC module. More...
 

Status

static uint32_t DCIC_GetStatusFlags (DCIC_Type *base)
 Get status flags. More...
 
static void DCIC_ClearStatusFlags (DCIC_Type *base, uint32_t mask)
 Clear status flags. More...
 

Interrupts

static void DCIC_LockInterruptEnabledStatus (DCIC_Type *base)
 Lock the interrupt enabled status. More...
 
static void DCIC_EnableInterrupts (DCIC_Type *base, uint32_t mask)
 Enable interrupts. More...
 
static void DCIC_DisableInterrupts (DCIC_Type *base, uint32_t mask)
 Disable interrupts. More...
 

Region

void DCIC_EnableRegion (DCIC_Type *base, uint8_t regionIdx, const dcic_region_config_t *config)
 Enable the region of interest (ROI) with configuration. More...
 
static void DCIC_DisableRegion (DCIC_Type *base, uint8_t regionIdx)
 Disable the region of interest (ROI). More...
 
static void DCIC_SetRegionRefCrc (DCIC_Type *base, uint8_t regionIdx, uint32_t crc)
 Set the reference CRC of interest (ROI). More...
 
static uint32_t DCIC_GetRegionCalculatedCrc (DCIC_Type *base, uint8_t regionIdx)
 Get the DCIC calculated CRC. More...
 

Misc control.

static void DCIC_EnableMismatchExternalSignal (DCIC_Type *base, bool enable)
 Enable or disable output the mismatch external signal. More...
 

Data Structure Documentation

struct _dcic_config

Data Fields

bool enableExternalSignal
 Enable the mismatch external signal. More...
 
uint8_t polarityFlags
 Display signal polarity, logical OR'ed of _DCIC_polarity_flags. More...
 
uint32_t enableInterrupts
 Interrupts to enable, should be OR'ed of _dcic_interrupt_enable. More...
 

Field Documentation

bool _dcic_config::enableExternalSignal

When enabled, the mismatch status could be monitored from the extern pin.

uint8_t _dcic_config::polarityFlags
uint32_t _dcic_config::enableInterrupts
struct _dcic_region_config

Data Fields

bool lock
 Lock the region configuration except reference CRC32 value setting. More...
 
uint16_t upperLeftX
 X of upper left corner. More...
 
uint16_t upperLeftY
 Y of upper left corner. More...
 
uint16_t lowerRightX
 X of lower right corner. More...
 
uint16_t lowerRightY
 Y of lower right corner. More...
 
uint32_t refCrc
 Reference CRC32 value. More...
 

Field Documentation

bool _dcic_region_config::lock
uint16_t _dcic_region_config::upperLeftX

Range: 0 to 2^13-1.

uint16_t _dcic_region_config::upperLeftY

Range: 0 to 2^12-1.

uint16_t _dcic_region_config::lowerRightX

Range: 0 to 2^13-1.

uint16_t _dcic_region_config::lowerRightY

Range: 0 to 2^12-1.

uint32_t _dcic_region_config::refCrc

Macro Definition Documentation

#define FSL_DCIC_DRIVER_VERSION   (MAKE_VERSION(2, 0, 3))
#define DCIC_CRC32_POLYNOMIAL   0x04C11DB7UL
#define DCIC_CRC32_INIT_VALUE   0UL
#define DCIC_REGION_MISMATCH_STATUS (   region)    (1UL << (DCIC_DCICS_ROI_MATCH_STAT_SHIFT + (region)))

Enumeration Type Documentation

Enumerator
kDCIC_VsyncActiveHigh 

VSYNC active high.

kDCIC_HsyncActiveHigh 

HSYNC active high.

kDCIC_DataEnableActiveHigh 

Data enable line active high.

kDCIC_DriveDataOnFallingClkEdge 

Output data on rising clock edge, capture data on falling clock edge.

kDCIC_VsyncActiveLow 

VSYNC active low.

kDCIC_HsyncActiveLow 

HSYNC active low.

kDCIC_DataEnableActiveLow 

Data enable line active low.

kDCIC_DriveDataOnRisingClkEdge 

Output data on falling clock edge, capture data on rising clock edge.

Enumerator
kDCIC_FunctionalInterruptStatus 

Asserted when match results ready.

kDCIC_ErrorInterruptStatus 

Asserted when there is a signature mismatch.

kDCIC_Region0MismatchStatus 

Region 0 CRC32 value mismatch.

kDCIC_Region1MismatchStatus 

Region 1 CRC32 value mismatch.

kDCIC_Region2MismatchStatus 

Region 2 CRC32 value mismatch.

kDCIC_Region3MismatchStatus 

Region 3 CRC32 value mismatch.

kDCIC_Region4MismatchStatus 

Region 4 CRC32 value mismatch.

kDCIC_Region5MismatchStatus 

Region 5 CRC32 value mismatch.

kDCIC_Region6MismatchStatus 

Region 6 CRC32 value mismatch.

kDCIC_Region7MismatchStatus 

Region 7 CRC32 value mismatch.

kDCIC_Region8MismatchStatus 

Region 8 CRC32 value mismatch.

kDCIC_Region9MismatchStatus 

Region 9 CRC32 value mismatch.

kDCIC_Region10MismatchStatus 

Region 10 CRC32 value mismatch.

kDCIC_Region11MismatchStatus 

Region 11 CRC32 value mismatch.

kDCIC_Region12MismatchStatus 

Region 12 CRC32 value mismatch.

kDCIC_Region13MismatchStatus 

Region 13 CRC32 value mismatch.

kDCIC_Region14MismatchStatus 

Region 14 CRC32 value mismatch.

kDCIC_Region15MismatchStatus 

Region 15 CRC32 value mismatch.

Enumerator
kDCIC_FunctionalInterruptEnable 

Interrupt when match results ready.

kDCIC_ErrorInterruptEnable 

Interrupt when there is a signature mismatch.

Function Documentation

void DCIC_Init ( DCIC_Type *  base,
const dcic_config_t config 
)

This function resets DCIC registers to default value, then set the configurations. This function does not start the DCIC to work, application should call DCIC_DisableRegion to configure regions, then call DCIC_Enable to start the DCIC to work.

Parameters
baseDCIC peripheral base address.
configPointer to the configuration.
void DCIC_Deinit ( DCIC_Type *  base)

Disable the DCIC functions.

Parameters
baseDCIC peripheral base address.
void DCIC_GetDefaultConfig ( dcic_config_t config)

The default configuration is:

config->polarityFlags = kDCIC_VsyncActiveLow | kDCIC_HsyncActiveLow |
config->enableExternalSignal = false;
config->enableInterrupts = 0;
Parameters
configPointer to the configuration.
static void DCIC_Enable ( DCIC_Type *  base,
bool  enable 
)
inlinestatic
Parameters
baseDCIC peripheral base address.
enableUse true to enable, false to disable.
static uint32_t DCIC_GetStatusFlags ( DCIC_Type *  base)
inlinestatic

The flag kDCIC_ErrorInterruptStatus is asserted if any region mismatch flag asserted.

base DCIC peripheral base address.

Returns
Masks of asserted status flags, _DCIC_status_flags.
static void DCIC_ClearStatusFlags ( DCIC_Type *  base,
uint32_t  mask 
)
inlinestatic

The flag kDCIC_ErrorInterruptStatus should be cleared by clearing all asserted region mismatch flags.

base DCIC peripheral base address. mask Mask of status values that would be cleared, _DCIC_status_flags.

static void DCIC_LockInterruptEnabledStatus ( DCIC_Type *  base)
inlinestatic

Once this function is called, the interrupt enabled status could not be changed until reset.

Parameters
baseDCIC peripheral base address.
static void DCIC_EnableInterrupts ( DCIC_Type *  base,
uint32_t  mask 
)
inlinestatic
Parameters
baseDCIC peripheral base address.
maskMask of interrupt events that would be enabled. See to "_dcic_interrupt_enable_t".
static void DCIC_DisableInterrupts ( DCIC_Type *  base,
uint32_t  mask 
)
inlinestatic
Parameters
baseDCIC peripheral base address.
maskMask of interrupt events that would be disabled. See to "_dcic_interrupt_enable_t".
void DCIC_EnableRegion ( DCIC_Type *  base,
uint8_t  regionIdx,
const dcic_region_config_t config 
)

Enable the ROI with configuration. To change the configuration except reference CRC value, the region should be disabled first by DCIC_DisableRegion, then call this function again. The reference CRC value could be changed by DCIC_SetRegionRefCrc without disabling the region. If the configuration is locked, only the reference CRC value could be changed, the region size and position, enable status could not be changed until reset.

Parameters
baseDCIC peripheral base address.
regionIdxRegion index, from 0 to (DCIC_REGION_COUNT - 1).
configPointer to the configuration.
static void DCIC_DisableRegion ( DCIC_Type *  base,
uint8_t  regionIdx 
)
inlinestatic
Parameters
baseDCIC peripheral base address.
regionIdxRegion index, from 0 to (DCIC_REGION_COUNT - 1).
static void DCIC_SetRegionRefCrc ( DCIC_Type *  base,
uint8_t  regionIdx,
uint32_t  crc 
)
inlinestatic
Parameters
baseDCIC peripheral base address.
regionIdxRegion index, from 0 to (DCIC_REGION_COUNT - 1).
crcThe reference CRC value.
static uint32_t DCIC_GetRegionCalculatedCrc ( DCIC_Type *  base,
uint8_t  regionIdx 
)
inlinestatic
Parameters
baseDCIC peripheral base address.
regionIdxRegion index, from 0 to (DCIC_REGION_COUNT - 1).
Returns
The calculated CRC value.
static void DCIC_EnableMismatchExternalSignal ( DCIC_Type *  base,
bool  enable 
)
inlinestatic

The mismatch status can be output to external pins. If enabled:

Parameters
baseDCIC peripheral base address.
enableUse true to enable, false to disable.